package com.yjn.blog.util;

/**
 * Classname: ErrorMessage
 * Package: com.bmw.bingfa.util
 * Description:
 *
 * @Author 余集楠
 * @Create 2024/5/29 0029 18:15
 * @Version 1.8
 */
public enum ErrorMessage {

    /**
     * 通用ERROR
     */
    SYS_ERROR(10000, "系统开小差了,稍后再试"),
    PARAM_ERROR(10001, "参数错误"),
    LOGIN_ERROR(10002, "用户未登录"),
    /**
     * user相关error.
     */

    USER_ERROR(30001,"用户不存在"),
    USER_NEED_LOGIN(30003, "用户需要登录");




    private Integer code;
    private String message;

    ErrorMessage(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public ErrorMessage setMessage(String message) {
        this.message = message;
        return this;
    }
}
